package com.adpython.service.impl;

import java.util.List;

import com.adpython.dao.ArticleDao;
import com.adpython.domain.Article;
import com.adpython.service.ArticleService;

public class ArticleServiceImpl implements ArticleService {
	
	private ArticleDao articleDao;
	
	public List<Article> getArticleByChannel(Long channelId){
		return articleDao.queryByChannel(channelId);
	}
	
	public void saveArticle(Article article){
		articleDao.save(article);
	}
	
	public void updateArticle(Article article){
		articleDao.update(article);
	}
	
	public Article getArticleById(Long id){
		return articleDao.get(id);
	}
	
	public void setArticleDao(ArticleDao articleDao){
		this.articleDao=articleDao;
	}
	public ArticleDao getArticleDao(){
		return this.articleDao;
	}
}
